package main

import (
	// "fmt"
	mgo "gopkg.in/mgo.v2"
	// bson "gopkg.in/mgo.v2/bson"
)

var(
	MongoClient * mgo.Session
)

func InitMongoClient() error{
	newMongoClient, err := mgo.Dial(Conf.MongoNodeAddress)
	if err != nil {
		// log里面输出
    	panic(err)
    	return err
  	}
  	MongoClient = newMongoClient
  	return nil
}